package com.iw.adoms.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import com.iw.adoms.entity.neum.FullStatus;
import com.iw.core.orm.hibernate.BaseEntity;

//库批次表
@Entity
@Table(name = "storage_batch")
@JsonIgnoreProperties({ "visible", "insertTime", "lastUpdateTime", "department", "marchandise", "state", "produceDate","hibernateLazyInitializer" })
public class StorageBatch extends BaseEntity {

	private String batchCode;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "marchandise_id")
	private Marchandise marchandise; // 入库商品

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "department_id")
	private Department department; // 所属部门

	private Date produceDate; // 生产日期

	private double numOfBox; // 入库件数
	private double numOfBoxHasDone = 0; // 已完成件数
	private Integer numOfMarchandise; // 本次入库的商品总数
	private Integer numOfMarchandiseHasDone = 0; // 已完成商品数量
	private String state = FullStatus.ZDDSM.v(); // 入库状态：待入库、入库中、已完成

	public String getBatchCode() {
		return batchCode;
	}

	public void setBatchCode(String batchCode) {
		this.batchCode = batchCode;
	}

	public Marchandise getMarchandise() {
		return marchandise;
	}

	public void setMarchandise(Marchandise marchandise) {
		this.marchandise = marchandise;
	}

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public Date getProduceDate() {
		return produceDate;
	}

	public void setProduceDate(Date produceDate) {
		this.produceDate = produceDate;
	}

	public double getNumOfBox() {
		return numOfBox;
	}

	public void setNumOfBox(double numOfBox) {
		this.numOfBox = numOfBox;
	}

	public double getNumOfBoxHasDone() {
		return numOfBoxHasDone;
	}

	public void setNumOfBoxHasDone(double numOfBoxHasDone) {
		this.numOfBoxHasDone = numOfBoxHasDone;
	}

	public Integer getNumOfMarchandise() {
		return numOfMarchandise;
	}

	public void setNumOfMarchandise(Integer numOfMarchandise) {
		this.numOfMarchandise = numOfMarchandise;
	}

	public Integer getNumOfMarchandiseHasDone() {
		return numOfMarchandiseHasDone;
	}

	public void setNumOfMarchandiseHasDone(Integer numOfMarchandiseHasDone) {
		this.numOfMarchandiseHasDone = numOfMarchandiseHasDone;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

}